<template>
    <a-dropdown>
        <a class="ant-dropdown-link" @click="e => e.preventDefault()" style="color: black; margin-left: 40px">
            课程分类 <a-icon type="down" />
        </a>
        <a-menu slot="overlay">
            <a-menu-item>
                <a href="javascript:;" v-for="(item,index) in rows" :key="index">{{item.subjectTitle}}</a>
            </a-menu-item>
        </a-menu>
    </a-dropdown>
</template>

<script>
    import {list} from '../api/api'

    export default {
        name: "Classification",
        data(){
            return{
                rows:[]
            }
        },
        created() {
            list(1).then(
                res => {
                    console.log(res);
                    this.rows=res.rows
                })
        }
    }
</script>

<style scoped>

</style>